// 授课班级总数
getAllTeacherClassinfo();

function getAllTeacherClassinfo() {
	$.ajax({
		url: "http://localhost:8080/Online-student/ClassinfoController/getAllTeacherClassinfo",
		type: "get",
		data: {
			tid: 1,
		},
		dataType: "json",
		success: function(result) {
			// console.log(result);
			if (result.status == 0) {
				$("#getAllTeacherClassinfo").html('<p>' + result.data.length + '</p>');
			}
		},
	})
}
// 公告总条数 -- 公告信息
limitoneAffiche();

function limitoneAffiche() {
	$.ajax({
		url: "http://localhost:8080/Online-student/AfficheController/limitoneAffiche",
		type: "get",
		data: {},
		dataType: "json",
		success: function(result) {
			console.log(result);
			if (result.data.length > 0) {
				$("#limitoneAffiche").html('<p>' + result.data[0].countone + '</p>');
			}
		}
	})
}
//班级人数
getCourseByCid();

function getCourseByCid() {
	$.ajax({
		url: "http://localhost:8080/Online-student/CourseController/getCourseByCid",
		type: "get",
		data: {
			cid: 1
		},
		dataType: "json",
		success: function(result) {
			console.log(result);
			if (result.status == 0) {
				$("#getCourseByCid").html('<p>' + result.data.length + '</p>');
			}
		}
	})
}
getTeaClassinfoNum();

function getTeaClassinfoNum() {
	$.ajax({
		url: "http://localhost:8080/Online-student/ClassinfoController/getTeaClassinfoNum",
		type: "get",
		data: {
			tid: 1
		},
		dataType: "json",
		success: function(result) {
			console.log(result);
			if (result.status == 0) {
				$("#getTeaClassinfoNum").html('<p>' + result.data.length + '</p>');
			}
		}
	})
}
